<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link rel="stylesheet" href="__PUBLIC__/assets/css/jquery-ui.css" />
</block>
<block name="stylecss">
<style type='text/css'>
.UploadBox{overflow:hidden;width:500px}
.UploadValue{width:260px;float:left;margin-right:4px;text-indent:6px}
.UploadConfirm{position:absolute;top:0;left:0;height:35px;filter:alpha(opacity:0);opacity:0;width:337px}
table{
	width:100%;
}
table td{
	text-align: center;
}
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>

	<li class="active">管理员列表</li>
</ul><!-- /.breadcrumb -->

</block>

<block name="content">
<form action="__CONTROLLER__/info" method='post' id='myformedit' enctype="multipart/form-data">
<input type="hidden" name='admin_id' value="{$admin_info.admin_id}">
<input type="hidden" name='action' value="adminauth_edit_action">
<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-warning"><i class="ace-icon fa fa-user bigger-120"></i> 管理员信息 </span></div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:150px;"> 您的身份是 </div>

    <div class="profile-info-value">
        <span style="color:green">{$admin_info.title}</span>
    </div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:150px;"> 账号名称 </div>

    <div class="profile-info-value">
        {$admin_info.admin_name}
    </div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:150px;"> 联系电话 </div>

    <div class="profile-info-value">
        <input type="text" name='admin_phone' value="{$admin_info.admin_phone}" class="col-xs-12">
    </div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:150px;"> 头像 </div>

    <div class="profile-info-value">

    <div class="nfile_imgbox" >
		<input type="file" class="nfile" id="file_upload" name="avatar" />
		<?php if (!empty($admin_info['admin_avatar'])) { ?>
		<img src="{$admin_info.admin_avatar}" id="preview">
		<?php }else{ ?>
		<img src="__PUBLIC__/assets/images/addfile.png" id="preview">
		<?php } ?>
		<a class="nimg_style">+<img src=""> </a>
	</div>
  
    </div>
</div>

<div class="profile-info-row">
    <div class="profile-info-name" style="text-align:center;width:150px;"> 拥有的权限 </div>

    <div class="profile-info-value">
    	<table class="table table-striped table-bordered table-hover">
        	<?php
        		for ($i=0; $i < $cols; $i++) {
					echo('<tr>');
					for ($j=0; $j < 5; $j++) {
						echo('<td>');
						if ($admin_info['rules'] == '*' || in_array($auth_arr[$i*5+$j]['id'], $rule_arr)) {
							echo "<span style='color:green'>".$auth_arr[$i*5+$j]['title']."</span>";
						}else{
							echo "<span style='color:red'>".$auth_arr[$i*5+$j]['title']."</span>";
						}
						echo('</td>');
					}
					echo('</tr>');
        		}
        	?>
        </table>
    </div>
</div>

<div style="margin-top:20px">
<button type="submit" class="btn btn-sm btn-primary">修改</button> <span class="btn btn-sm" onClick="location.href='{:U('Index/index')}'">返回首页</span>
</div>
</form>
</block>
<block name="scripts"></block>
<block name="jscript">
<script script="text/javascript">

</script>
</block>